package com.tien.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 角色.
 * 
 * 注意@Cache(Entity与集合的缓存),@ManyToMany/@JoinTable(多对多关系),@OrderBy/LinkedHashSet(
 * 集合排序),@Transient(非持久化属性)的应用.
 * 
 * @author tian
 */
@Entity  
@Table(name = "ROLES")  
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)  
public class Role implements java.io.Serializable{  
      
    /**
	 * 
	 */
	private static final long serialVersionUID = -6418678739647609809L;

	@Id  
    @GeneratedValue  
    private Integer id;  
      
    private String name;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}  
}  